// dynare GrievanceLinearSeasonal.mod called by SimGrievanceLoopFinal.m
 
var w c v a;    //log deviation wage; log deviation consumption; log deviation violence; assets (deviation as share of steady state consumption); 
varexo wSVshock; // seasonal shock to wages

parameters 
rho sigma phi psi wbar cbar vbar r;   

rho=rho1;               //Persistence of wage shock (not needed with seasonal shcoks)
sigma=sigma1;           //Risk aversion
phi=phi1;               //Opportunity cost is -phi (curvature of violence preferences)
beta=beta1;             //Quarterly discount rate (in the manuscript we call this delta, because beta is the coefficient in a regression)
wbar=wbar1;             //Steady state wage (level)
psi=psi1;               //Utility weight time allocated to violence
vbar =vbar1;            //Steady state time allocated to violence
cbar=cbar1;             //Steady state consumption
r=beta^-1-1;            //Steady state interest rate

model;                                  // 4 log-linearized equations - see Online Appendix 2.2 
c=c(+1);                                // Euler Equation
v=-(phi)*w+(sigma*phi)*c;               // FOC for allocating time between working and fighting
a=(1+r)*a(-1)+w-(wbar*vbar/cbar)*v-c;   // Budget constraint
w=w(-4)+wSVshock;                       // Seasonal process for wages 
end;

steady;
check;

shocks;
var wSVshock;
stderr 0.05;
end;

stoch_simul(irf=40,order=1, noprint, nograph, periods=1000, drop=100);

